Personal Finance with Python by Max Humber

Personal Finance with Python by Max Humber

Author:Max Humber
Language: eng
Format: epub
ISBN: 9781484238028
Publisher: Apress


.normalize all the things.

datetime

Python ships with datetime. Consequently, we can create datetime.datetime objects and datetime.date objects out of the box like this:

import datetime

date_1 = datetime.datetime.now()

print(date_1)

print(date_1.__repr__())

print(type(date_1))

date_2 = datetime.date.today()

print(date_2)

print(date_2.__repr__())

print(type(date_2))

2018-05-29 21:34:10.877373

datetime.datetime(2018, 5, 29, 21, 34, 10, 877373)

2018-05-29

datetime.date(2018, 5, 29)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.